package com.tpu.daoclasses;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DefaultSessionCreator implements SessionCreator {
	private SessionFactory sessionFactory;

	public DefaultSessionCreator() {
		Configuration cfg = new Configuration();
		sessionFactory = cfg.buildSessionFactory();
	}

	public Session createSession() {
		return sessionFactory.openSession();
	}
}
